/*
 * @Descripttion: 
 * @Author: junhuafly
 * @Date: 2020-04-11 11:12:56
 * @LastEditors: junhuafly
 * @Email: junhuafly@163.com
 * @LastEditTime: 2020-04-13 10:02:57
 */

const {
    request
} = require('./../utils/request.js')

class Global {
    constructor() {

    }

    /**
     * 关键字推荐
     * 
     * @param {any} data 
     * @returns 
     * 
     * @memberOf Global
     */
    querySearchByKey(data){
        return request.get('/search/suggest',data)
    }
    
    /**
     * 查找商品
     * 
     * @param {any} data 
     * @returns 
     * 
     * @memberOf Global
     */
    queryGoodsByKey(data){
        return request.post('/search/product',data)
    }

    /**
     * 搜索笔记
     * 
     * @param {any} data 
     * @returns 
     * 
     * @memberOf Global
     */
    queryNoteByKey(data){
        return request.post('/search/note',data)
    }

    /**
     * 搜索用户
     * 
     * @param {any} data 
     * @returns 
     * 
     * @memberOf Global
     */
    queryCustomerByKey(data){
        return request.post('/customer/search',data)
    }

}
exports.globalAPI = new Global